package com.example.prison.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommonService {
   @Autowired
   RabbitTemplate rabbitTemplate;

   public void intoRabbitMq(String msg) {
      this.rabbitTemplate.convertAndSend("direct_exchange_voltage", "prison_direct_routing_key_voltage", msg);
   }
}
